<?php
namespace Admin\Model;

use Think\Model;

class PartnerModel extends Model{
	
	public $isPassed = array(
		'0' => '待审',
		'1' => '已通过',
		'2' => '已驳回'
	);
	
	protected $_validate = array(
			array('name', 'require', '合作商名称必须', self::MUST_VALIDATE),
			array('password', 'require', '密码必须', self::EXISTS_VALIDATE, '', self::MODEL_INSERT),
			array('tel', '', '合作商电话已经存在', self::EXISTS_VALIDATE, 'unique'),
	);
	
	protected $_auto = array(
	    array('support', 'htmlspecialchars_decode', self::MODEL_BOTH, 'function'),
	);
}